package k8.buffer;

import k8.buffer.var.VARColoursBuffer;
import k8.buffer.vbo.VBOColoursBuffer;

import org.lwjgl.opengl.GLContext;


public abstract class ColoursBuffer extends Buffer {
    
    /**
     * Creates an instance of TexCoordsBuffer.
     * 
     * @param initialcapacity
     *          Initial capacity (number of indices)
     */
    public ColoursBuffer(int initialcapacity) {
        super(3*initialcapacity);
    }
    
    /**
     * Gets an instance of TexCoordsBuffer.
     * 
     * @param initialcapacity
     *          Initial capacity (number of vertices)
     */
    public static ColoursBuffer getInstance(int initialcapacity) {
        return ( GLContext.getCapabilities().GL_ARB_vertex_buffer_object ) ? new VBOColoursBuffer(initialcapacity) : new VARColoursBuffer(initialcapacity);
    }
    
    /** Gets a Slice of this buffer */
    public Slice getSlice() {
    	return getSlice(36);
    }
    
    /** Tells OpenGL this buffer contains the colours */
    public abstract void glColourPointer();

}
